package com.cedric.yixianpai.game.cards;

import com.cedric.yixianpai.game.Status.DuelStatus;
import com.cedric.yixianpai.game.interfaces.Card;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class PuTongGongJi extends Card {
    /**
     * 普通攻击
     */
    public PuTongGongJi(@Value("1") int lvl) {
        super("普通攻击");
        this.setDescription("普通攻击 3/6/9攻");
        this.setLevel(lvl);
        if (1 == lvl) {
            this.setDamage(3);
        } else if (2 == lvl) {
            this.setDamage(6);
        } else if (3 == lvl) {
            this.setDamage(9);
        }
    }

    @Override
    public boolean effect(DuelStatus Sta1, DuelStatus Sta2) {
        Sta1.attack(Sta2, this.getDamage());
        Sta1.getPlayerBuff().setSwordIntent(0);
        return true;
    }
}
